package com.cs.contract.controller;

import com.cs.contract.service.CsPaymentService;
import com.cs.contract.domain.CsPayment;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：zrx
 * @Package：com.cs.controller
 * @Project：RuoYi-Cloud
 * @name：CsPaymentController
 * @Date：2024/11/18 19:33
 * @Filename：CsPaymentController
 */
@RestController
@RequestMapping("/payment")
public class CsPaymentController extends BaseController {
    private final CsPaymentService csPaymentService;

    public CsPaymentController(CsPaymentService csPaymentService) {
        this.csPaymentService = csPaymentService;
    }

    @GetMapping("/list")
    public TableDataInfo listCsPayment(CsPayment csPayment) {
        startPage();
        List<CsPayment> list = csPaymentService.listCsPayment(csPayment);
        return getDataTable(list);
    }
}
